<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
<title>病人挂号信息确定页</title>
<!-- 引入EasyUI的相关css和js文件 -->
<link href="EasyUI/themes/default/easyui.css" rel="stylesheet"
	type="text/css" />
<link href="EasyUI/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="EasyUI/demo.css" rel="stylesheet" type="text/css" />
<script src="EasyUI/jquery.min.js" type="text/javascript"></script>
<script src="EasyUI/jquery.easyui.min.js" type="text/javascript"></script>
<script src="EasyUI/easyui-lang-zh_CN.js" type="text/javascript"></script>
</head>

<body>	
	<script type="text/javascript">
		function clearForm() {
			$('#patient_checkForm').form('clear');
		}

      function checkPatient_info() {
			$('#patient_checkForm').form("submit", {
				
				url : 'patient/checkinfo', 
				success : function(result) {
					var result = eval('(' + result + ')');
					if (result.success == 'true') {
						var currentTab = $('#tabs').tabs('getSelected');

					    var url = 'registration.jsp'

					    $("#tabs").tabs('update',{
					        tab: currentTab,
					        options:{
					        	//title : "增加病人信息",
					            href: url
					            
					        }
					    });
					currentTab.panel('refresh');
						
					} else {
						$.messager.show({
							title : "提示信息",
							msg : result.message
						});
					}
				}
			});
		}
      var currentTab = $('#tabs').tabs('getSelected');
      
      
      function addPatient(currentTab) {
    	 
    	  /*$('#tabs').tabs('add', {
				title : "增加病人信息",
				href : 'add_patient.jsp',
				closable : true
			});
		*/	
		var currentTab = $('#tabs').tabs('getSelected');

		    var url = 'add_patient.jsp'

		    $("#tabs").tabs('update',{
		        tab: currentTab,
		        options:{
		        	title : "增加病人信息",
		            href: url
		            
		        }
		    });
		currentTab.panel('refresh');

		
	}
	</script>
	
		<form id="patient_checkForm" method="post">
			<table style="font-size: 13;">
				<tr>
					<th >诊疗卡号</th>									
					<td><input id="checkNo" name="checkNo" class="easyui-validatebox" type="text" data-options="required:true,missingMessage:'请输入18位身份证号（诊疗卡号）',validType:'length[18,18]'"></input></td>
				</tr>
				
			</table>
		</form>
	
	<div id="bb">
		<a href="javascript:void(0)" class="easyui-linkbutton"
			onclick="checkPatient_info()">确定</a><a href="javascript:void(0)"
			class="easyui-linkbutton" onclick="clearForm();">重置</a><a href="javascript:void(0)"
			class="easyui-linkbutton" onclick="addPatient();">>新建信息</a>
	</div>

</body>
</html>